package models

type LtsJob struct {
	JobHost string
	JobName string
	JobGroup string
	Classname string
	Namespace string
}

func GetJobByName(jobName, namespace string) (*LtsJob, error) {
	var j LtsJob
	if err := db.Where("job_name = ? and namespace = ?", jobName, namespace).Find(&j).Error; err != nil {
		return nil, err
	}

	return &j, nil
}